package com.xuan.service;
import com.xuan.dao.SectionDao;
import com.xuan.model.Section;
import java.util.List;
public class Service {
    private SectionDao sectionDao = new SectionDao();

    public boolean add (Section section) {
        return sectionDao.add(section);
    }

    public boolean delete (int id) {
        return sectionDao.delete(id);
    }

    public boolean update (Section section) {
        return sectionDao.update(section);
    }

    public List<Section> getAllByGame (int id) {
        return sectionDao.getAll(id);
    }

    public List<Section> getAll () {
        return sectionDao.getAll();
    }

    public List<Section> getAll (int size,int page) {
        return sectionDao.getAll(size,page);
    }

    public int getPageSize (int size) {
        return sectionDao.getPageSize(size);
    }

    public Section get (int id) {
        return sectionDao.get(id);
    }
}
